package com.example.demo.vo.task;

import com.example.demo.po.task.Task;
import lombok.Data;
import org.springframework.lang.NonNull;

@Data
public class TaskSimpleVO {
    private int tid;
    private int type;
    private String title;
    private int state;
    private int workerNum;
    private int currentWorkerNum;
    private int takeState;
    private int difficulty;
    private int device;
    //private UserRole userRole;

    public TaskSimpleVO() {
    }

    public TaskSimpleVO(@NonNull Task task) {

        tid = task.getTid();
        type = task.getType();
        title = task.getTitle();
        state = task.getState();
        workerNum = task.getWorkerNum();
        currentWorkerNum = task.getCurrentWorkerNum();
        difficulty=task.getDifficulty();
        device=task.getDevice();
    }
}
